home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / imglib2 / imgICache.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  4KB  |  151 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM imgICache.idl
  3.  */
  4.  
  5. #ifndef __gen_imgICache_h__
  6. #define __gen_imgICache_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIURI; /* forward declaration */
  18.  
  19. class imgIRequest; /* forward declaration */
  20.  
  21. class nsIProperties; /* forward declaration */
  22.  
  23.  
  24. /* starting interface:    imgICache */
  25. #define IMGICACHE_IID_STR "f1b74aae-5661-4753-a21c-66dd644afebc"
  26.  
  27. #define IMGICACHE_IID \
  28.   {0xf1b74aae, 0x5661, 0x4753, \
  29.     { 0xa2, 0x1c, 0x66, 0xdd, 0x64, 0x4a, 0xfe, 0xbc }}
  30.  
  31. /**
  32.  * imgICache interface
  33.  *
  34.  * @author Stuart Parmenter <pavlov@netscape.com>
  35.  * @version 0.1
  36.  * @see imagelib2
  37.  */
  38. class NS_NO_VTABLE imgICache : public nsISupports {
  39.  public: 
  40.  
  41.   NS_DEFINE_STATIC_IID_ACCESSOR(IMGICACHE_IID)
  42.  
  43.   /**
  44.    * Evict images from the cache.
  45.    *
  46.    * @param chrome If TRUE,  evict only chrome images.
  47.    *               If FALSE, evict everything except chrome images.
  48.    */
  49.   /* void clearCache (in boolean chrome); */
  50.   NS_IMETHOD ClearCache(PRBool chrome) = 0;
  51.  
  52.   /**
  53.    * Evict images from the cache.
  54.    *
  55.    * @param uri The URI to remove.
  56.    * @return NS_OK if \a uri was removed from the cache.
  57.    *         NS_ERROR_NOT_AVAILABLE if \a uri was unable to be removed from the cache.
  58.    */
  59.   /* void removeEntry (in nsIURI uri); */
  60.   NS_IMETHOD RemoveEntry(nsIURI *uri) = 0;
  61.  
  62.   /**
  63.    * Find Properties
  64.    * Used to get properties such as 'type' and 'content-disposition'
  65.    * 'type' is a nsISupportsCString containing the images' mime type such as 'image/png'
  66.    * 'content-disposition' will be a nsISupportsCString containing the header
  67.    * If you call this before any data has been loaded from a URI, it will succeed,
  68.    * but come back empty.
  69.    *
  70.    * @param uri The URI to look up.
  71.    * @returns NULL if the URL was not found in the cache
  72.    */
  73.   /* nsIProperties findEntryProperties (in nsIURI uri); */
  74.   NS_IMETHOD FindEntryProperties(nsIURI *uri, nsIProperties **_retval) = 0;
  75.  
  76. };
  77.  
  78. /* Use this macro when declaring classes that implement this interface. */
  79. #define NS_DECL_IMGICACHE \
  80.   NS_IMETHOD ClearCache(PRBool chrome); \
  81.   NS_IMETHOD RemoveEntry(nsIURI *uri); \
  82.   NS_IMETHOD FindEntryProperties(nsIURI *uri, nsIProperties **_retval); 
  83.  
  84. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  85. #define NS_FORWARD_IMGICACHE(_to) \
  86.   NS_IMETHOD ClearCache(PRBool chrome) { return _to ClearCache(chrome); } \
  87.   NS_IMETHOD RemoveEntry(nsIURI *uri) { return _to RemoveEntry(uri); } \
  88.   NS_IMETHOD FindEntryProperties(nsIURI *uri, nsIProperties **_retval) { return _to FindEntryProperties(uri, _retval); } 
  89.  
  90. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  91. #define NS_FORWARD_SAFE_IMGICACHE(_to) \
  92.   NS_IMETHOD ClearCache(PRBool chrome) { return !_to ? NS_ERROR_NULL_POINTER : _to->ClearCache(chrome); } \
  93.   NS_IMETHOD RemoveEntry(nsIURI *uri) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveEntry(uri); } \
  94.   NS_IMETHOD FindEntryProperties(nsIURI *uri, nsIProperties **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->FindEntryProperties(uri, _retval); } 
  95.  
  96. #if 0
  97. /* Use the code below as a template for the implementation class for this interface. */
  98.  
  99. /* Header file */
  100. class _MYCLASS_ : public imgICache
  101. {
  102. public:
  103.   NS_DECL_ISUPPORTS
  104.   NS_DECL_IMGICACHE
  105.  
  106.   _MYCLASS_();
  107.  
  108. private:
  109.   ~_MYCLASS_();
  110.  
  111. protected:
  112.   /* additional members */
  113. };
  114.  
  115. /* Implementation file */
  116. NS_IMPL_ISUPPORTS1(_MYCLASS_, imgICache)
  117.  
  118. _MYCLASS_::_MYCLASS_()
  119. {
  120.   /* member initializers and constructor code */
  121. }
  122.  
  123. _MYCLASS_::~_MYCLASS_()
  124. {
  125.   /* destructor code */
  126. }
  127.  
  128. /* void clearCache (in boolean chrome); */
  129. NS_IMETHODIMP _MYCLASS_::ClearCache(PRBool chrome)
  130. {
  131.     return NS_ERROR_NOT_IMPLEMENTED;
  132. }
  133.  
  134. /* void removeEntry (in nsIURI uri); */
  135. NS_IMETHODIMP _MYCLASS_::RemoveEntry(nsIURI *uri)
  136. {
  137.     return NS_ERROR_NOT_IMPLEMENTED;
  138. }
  139.  
  140. /* nsIProperties findEntryProperties (in nsIURI uri); */
  141. NS_IMETHODIMP _MYCLASS_::FindEntryProperties(nsIURI *uri, nsIProperties **_retval)
  142. {
  143.     return NS_ERROR_NOT_IMPLEMENTED;
  144. }
  145.  
  146. /* End of implementation class template. */
  147. #endif
  148.  
  149.  
  150. #endif /* __gen_imgICache_h__ */
  151.